package org.operamasks.data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class IpService {
	
	public static List<Ip> ipInfos = new ArrayList<Ip>(
		Arrays.asList(new Ip[]{
				new Ip(1, "0.0.0.0", "0.255.255.255", "IANA保留地址", "CZ88.NET"),
				new Ip(2, "1.0.0.0", "1.0.0.255", "澳大利亚", "CZ88.NET"),
				new Ip(3, "1.0.1.0", "1.0.3.255", "福建省", "电信"),
				new Ip(4, "1.0.4.0", "1.0.7.255", "澳大利亚", "CZ88.NET"),
				new Ip(5, "1.0.128.0", "1.0.255.255", "泰国", "CZ88.NET"),
				new Ip(6, "1.0.16.0", "1.0.31.255", "日本", "CZ88.NET"),
				new Ip(7, "1.0.32.0", "1.0.63.255", "广东省", "电信"),
				new Ip(8, "1.0.64.0", "1.0.127.255", "日本", "CZ88.NET"),
				new Ip(9, "1.0.8.0", "1.0.15.255", "广东省", "电信"),
				new Ip(10, "1.1.0.0", "1.1.0.255", "福建省", "电信"),
				new Ip(11, "1.1.1.0", "1.1.1.255", "澳大利亚", "CZ88.NET"),
				new Ip(12, "1.1.2.0", "1.1.7.255", "福建省", "电信"),
				new Ip(13, "1.1.8.0", "1.1.63.255", "广东省", "电信"),
				new Ip(14, "1.1.64.0", "1.1.127.255", "日本", "CZ88.NET"),
				new Ip(15, "1.1.128.0", "1.1.255.255", "泰国", "CZ88.NET"),
				new Ip(16, "1.2.0.0", "1.2.1.255", "福建省", "电信"),
				new Ip(17, "1.2.2.0", "1.2.2.255", "北京市", "北龙中网科技有限公司"),
				new Ip(18, "1.2.3.0", "1.2.3.3", "澳大利亚", "CZ88.NET"),
				new Ip(19, "1.2.3.4", "1.2.3.4", "印度尼西亚", "CZ88.NET"),
				new Ip(20, "1.2.3.5", "1.2.3.255", "澳大利亚", "CZ88.NET"),
				new Ip(21, "1.2.4.0", "1.2.7.255", "福建省", "电信"),
				new Ip(22, "1.2.8.0", "1.2.127.255", "广东省", "电信"),
				new Ip(23, "1.2.128.0", "1.2.255.255", "泰国", "CZ88.NET"),
				new Ip(24, "1.3.0.0", "1.3.255.255", "广东省", "电信"),
				new Ip(25, "1.4.0.0", "1.4.0.255", "澳大利亚", "CZ88.NET"),
				new Ip(26, "1.4.1.0", "1.4.3.255", "福建省", "电信"),
				new Ip(27, "1.4.4.0", "1.4.4.255", "北京市", "北龙中网科技有限公司"),
				new Ip(28, "1.4.5.0", "1.10.9.255", "福建省", "电信"),
				new Ip(29, "1.10.10.0", "1.10.10.255", "澳大利亚", "CZ88.NET"),
				new Ip(30, "1.10.11.0", "1.10.15.255", "福建省", "电信"),
				new Ip(31, "1.10.16.0", "1.10.127.255", "广东省", "电信"),
				new Ip(32, "1.10.128.0", "1.10.255.255", "泰国", "CZ88.NET"),
				new Ip(33, "1.11.0.0", "1.11.255.255", "韩国", "CZ88.NET"),
				new Ip(34, "1.12.0.0", "1.15.255.255", "北京市", "北京北大方正宽带网络科技有限公司"),
				new Ip(35, "1.16.0.0", "1.19.255.255", "韩国", "CZ88.NET"),
				new Ip(36, "1.20.0.0", "1.20.255.255", "泰国", "CZ88.NET"),
				new Ip(37, "1.21.0.0", "1.21.255.255", "日本", "CZ88.NET"),
                new Ip(38, "1.22.0.0", "1.23.255.255", "印度", "CZ88.NET"),
                new Ip(39, "1.24.0.0", "1.31.255.255", "内蒙古", "联通"),
                new Ip(40, "1.32.0.0", "1.32.255.255", "香港", "CZ88.NET"),
                new Ip(41, "1.33.0.0", "1.33.255.255", "日本", "CZ88.NET"),
                new Ip(42, "1.34.0.0", "1.35.255.255", "台湾省", "CZ88.NET"),
                new Ip(43, "1.36.0.0", "1.36.255.255", "香港", "电讯盈科有限公司"),
                new Ip(44, "1.37.0.0", "1.37.255.255", "菲律宾", "CZ88.NET"),
                new Ip(45, "1.38.0.0", "1.39.255.255", "印度", "CZ88.NET"),
                new Ip(46, "1.40.0.0", "1.44.255.255", "澳大利亚", "CZ88.NET"),
                new Ip(47, "1.45.0.0", "1.45.255.255", "北京市", "万网志成科技有限公司"),
                new Ip(48, "1.46.0.0", "1.47.255.255", "泰国", "CZ88.NET"),
                new Ip(49, "1.48.0.0", "1.49.255.255", "贵州省", "电信"),
                new Ip(50, "1.50.0.0", "1.50.255.255", "宁夏", "电信"),
                new Ip(51, "1.51.0.0", "1.51.255.255", "山东省济南市", "山东大学"),
                new Ip(52, "1.52.0.0", "1.55.255.255", "越南", "河内"),
                new Ip(53, "1.56.0.0", "1.56.255.255", "黑龙江省", "联通"),
                new Ip(54, "1.57.0.0", "1.57.97.255", "黑龙江省齐齐哈尔市", "联通"),
                new Ip(55, "1.57.98.0", "1.57.98.255", "黑龙江省齐齐哈尔市讷河市", "联通"),
                new Ip(56, "1.57.99.0", "1.57.255.255", "黑龙江省齐齐哈尔市", "联通"),
                new Ip(57, "1.58.0.0", "1.58.255.255", "黑龙江省哈尔滨市", "联通"),
                new Ip(58, "1.59.0.0", "1.60.149.255", "黑龙江省", "联通"),
                new Ip(59, "1.60.150.0", "1.60.158.255", "黑龙江省", "联通 "),
                new Ip(60, "1.60.159.0", "1.60.159.255", "黑龙江省", "联通"),
                new Ip(61, "1.60.160.0", "1.60.160.255", "黑龙江省哈尔滨市", "联通"),
                new Ip(62, "1.60.161.0", "1.60.204.255", "黑龙江省", "联通"),
                new Ip(63, "1.60.205.0", "1.60.205.255", "黑龙江省齐齐哈尔市", "联通"),
                new Ip(64, "1.60.206.0", "1.63.255.255", "黑龙江省", "联通"),
                new Ip(65, "1.64.0.0", "1.65.255.255", "香港", "电讯盈科有限公司"),
                new Ip(66, "1.66.0.0", "1.67.255.255", "日本", "CZ88.NET"),
                new Ip(67, "1.68.0.0", "1.71.255.255", "山西省", "电信"),
                new Ip(68, "1.72.0.0", "1.79.255.255", "日本", "CZ88.NET"),
                new Ip(69, "1.80.255.255", "陕西省西安市", "", "电信"),
                new Ip(70, "1.81.0.0", "1.81.255.255", "陕西省", "电信"),
                new Ip(71, "1.82.0.0", "1.83.255.255", "陕西省西安市", "电信"),
                new Ip(72, "1.84.0.0", "1.84.255.255", "陕西省", "电信"),
                new Ip(73, "1.85.0.0", "1.85.0.45", "陕西省西安市", "电信"),
                new Ip(74, "1.85.0.46", "1.85.0.46", "陕西省西安市", "临潼区海岸网络"),
                new Ip(75, "1.85.0.47", "1.85.17.145", "陕西省西安市", "电信"),
                new Ip(76, "1.85.17.146", "1.85.17.146", "陕西省西安市", "西北大学"),
                new Ip(77, "1.85.17.147", "1.85.255.255", "陕西省西安市", "电信"),
                new Ip(78, "1.86.0.0", "1.86.255.255", "陕西省", "电信"),
                new Ip(79, "1.87.0.0", "1.87.255.255", "陕西省榆林市", "电信"),
                new Ip(80, "1.88.0.0", "1.91.255.255", "北京市", "歌华宽带"),
                new Ip(81, "1.92.0.0", "1.93.255.255", "北京市", "电信通"),
                new Ip(82, "1.94.0.0", "1.95.255.255", "北京市", "宽带通"),
                new Ip(83, "1.96.0.0", "1.111.255.255", "韩国", "CZ88.NET"),
				new Ip(84, "1.112.0.0", "1.115.255.255", "日本", "CZ88.NET"),
				new Ip(85, "1.116.0.0", "1.119.255.255", "中国", "中电华通"),
				new Ip(86, "1.120.0.0", "1.159.255.255", "澳大利亚", "CZ88.NET"),
				new Ip(87, "1.160.0.0", "1.175.255.255", "台湾省", "CZ88.NET"),
				new Ip(88, "1.176.0.0", "1.177.255.255", "韩国", "CZ88.NET"),
				new Ip(89, "1.178.0.0", "1.179.127.255", "澳大利亚", "CZ88.NET"),
				new Ip(90, "1.179.128.0", "1.179.255.255", "泰国", "CZ88.NET"),
				new Ip(91, "1.180.0.0", "1.183.255.255", "内蒙古", "电信"),
				new Ip(92, "1.184.0.0", "1.184.127.255", "广东省广州市", "暨南大学"),
				new Ip(93, "1.184.128.0", "1.184.255.255", "广东省广州市", "教育网"),
				new Ip(94, "1.185.0.0", "1.185.95.255", "广西南宁市", "广西大学"),
				new Ip(95, "1.185.96.0", "1.185.255.255", "广东省广州市", "教育网"),
				new Ip(96, "1.186.0.0", "1.187.255.255", "印度", "CZ88.NET"),
				new Ip(97, "1.188.0.0", "1.191.255.255", "黑龙江省", "联通"),
				new Ip(98, "1.192.0.0", "1.193.255.255", "河南省郑州市", "电信"),
				new Ip(99, "1.194.0.0", "1.194.27.255", "河南省平顶山市", "电信"),
				new Ip(100, "1.194.28.0", "1.194.28.255", "河南省平顶山市", "(新华区)电信"),
				new Ip(101, "1.194.36.255", "end", "河南省平顶山市", "电信"),
				new Ip(102, "1.194.37.0", "1.194.37.255", "河南省平顶山市", "(新华区)电信"),
				new Ip(103, "1.194.38.0", "1.194.255.255", "河南省平顶山市", "电信"),
				new Ip(104, "1.195.0.0", "1.195.201.255", "河南省三门峡市", "电信"),
				new Ip(105, "1.195.202.0", "1.195.202.255", "河南省三门峡市灵宝市", "电信"),
				new Ip(106, "1.195.203.0", "1.195.255.255", "河南省三门峡市", "电信"),
				new Ip(107, "1.196.0.0", "1.196.255.255", "河南省", "电信"),
				new Ip(108, "1.197.0.0", "1.197.40.255", "河南省许昌市", "电信"),
				new Ip(109, "1.197.41.0", "1.197.41.255", "河南省漯河市", "电信"),
				new Ip(110, "1.197.42.0", "1.197.63.255", "河南省许昌市", "电信"),
				new Ip(111, "1.197.64.0", "1.197.127.255", "河南省周口市", "电信"),
				new Ip(112, "1.197.128.0", "1.197.196.255", "河南省许昌市", "电信"),
				new Ip(113, "1.197.197.0", "1.197.197.255", "河南省济源市", "电信"),
				new Ip(114, "1.197.198.0", "1.197.218.255", "河南省许昌市", "电信"),
				new Ip(115, "1.197.219.0", "1.197.219.255", "河南省安阳市", "电信"),
				new Ip(116, "1.197.220.0", "1.197.255.255", "河南省许昌市", "电信"),
				new Ip(117, "1.198.0.0", "1.199.255.255", "南省", "电信"),
				new Ip(118, "1.200.0.0", "1.200.255.255", "台湾省", "CZ88.NET"),
				new Ip(119, "1.201.0.0", "1.201.255.255", "韩国", "CZ88.NET"),
				new Ip(120, "1.202.0.0", "1.202.85.130", "北京市", "电信"),
				new Ip(121, "1.202.85.131", "1.202.85.131", "北京市", "首都机场WIFI"),
				new Ip(122, "1.202.85.132", "1.203.255.255", "北京市", "电信"),
				new Ip(123, "1.204.0.0", "1.206.5.255", "贵州省", "电信"),
				new Ip(124, "1.206.6.0", "1.206.6.255", "贵州省六盘水市", "电信"),
				new Ip(125, "1.206.7.0", "1.207.255.255", "贵州省", "电信"),
				new Ip(126, "1.208.0.0", "1.255.255.255", "韩国", "CZ88.NET")
		})
	);
	public List<Ip> getIpsByCity(String city){
		int size= ipInfos.size();
		List<Ip> ips=new ArrayList();
		for(int i=0; i<size; i++){
			if(ipInfos.get(i).getCity().contains(city))
				ips.add(ipInfos.get(i));
		}
		return ips;
		
	}
}
